import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { GoodsTableComponent } from './pages/basisinfo-table/basisinfo-table.component';
import { GoodsDetailComponent } from './pages/basisinfo-detail/basisinfo-detail.component';
import { GoodstwoDetailComponent } from './pages/basisinfotwo-detail/basisinfotwo-detail.component';
import { UserDetailComponent } from './pages/user-detail/user-detail.component';
const routes: Routes = [
    {
        path: 'info',
        component: GoodsTableComponent,
        data: { breadcrumbs: [{ title: '基础信息' }] },
        children: [
            {
                path: 'detail/:id',
                component: GoodsDetailComponent,
                data: { breadcrumbs: [{ title: '商品列表', path: '/basisinfo/info' }, { title: '商品详情' }] }
            },
            {
                path: 'detail',
                component: GoodsDetailComponent,
                data: { breadcrumbs: [{ title: '商品列表', path: '/basisinfo/info' }, { title: '添加商品' }] }
            },
            {
                path: 'add/:id',
                component: GoodstwoDetailComponent,
                data: { breadcrumbs: [{ title: '商品列表', path: '/basisinfo/info' }, { title: '客户详情' }] }
            },
            {
                path: 'add',
                component: GoodstwoDetailComponent,
                data: { breadcrumbs: [{ title: '商品列表', path: '/basisinfo/info' }, { title: '添加客户' }] }
            },
            {
                path: 'user/:id',
                component: UserDetailComponent,
                data: { breadcrumbs: [{ title: '商品列表', path: '/basisinfo/info' }, { title: '用户详情' }] }
            },
            {
                path: 'user',
                component: UserDetailComponent,
                data: { breadcrumbs: [{ title: '商品列表', path: '/basisinfo/info' }, { title: '添加用户' }] }
            }
        ]
    },
];

export const declarationComponents = [
    GoodsTableComponent,
    GoodsDetailComponent,
    GoodstwoDetailComponent,
    UserDetailComponent
];

export const entryComponents = [
];

@NgModule({
    imports: [
        RouterModule.forChild(routes)
    ],
    exports: [
        RouterModule
    ]
})
export class StoreRoutingModule { }
